home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / os2 / alrmpr.arj / APINST.CMD < prev    next >
OS/2 REXX Batch file  |  1993-11-15  |  2KB  |  95 lines

  1. /* */
  2. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  3. call SysLoadFuncs
  4. call SysCls
  5. pos = SysCurPos(5,0)
  6. say 'Enter the target drive and directory then press <ENTER>'
  7. PULL targdrv
  8. say ' '
  9. say 'Enter the source drive and directory then press <ENTER>'
  10. PULL srcepath
  11. say ' '
  12. say 'Installing Alarm Pro in 'targdrv
  13.  
  14. call STARTINSTALL
  15. call INSTALRMPRO
  16.    
  17.  
  18. say ' '
  19. say '┌───────────────────────────────────────────┐'
  20. say '│                                           │'
  21. say '│         Alarm Pro INSTALLED               │'
  22. say '│                                           │'
  23. say '│ Be sure that the selected directory is in │'
  24. say '│ your LIBPATH= statement or .\ is in the   │'
  25. say '│ LIBPATH.  See your CONFIG.SYS file.       │'
  26. say '│                                           │'
  27. say '└───────────────────────────────────────────┘'
  28. exit
  29.  
  30.  
  31.  
  32.  
  33.  
  34. STARTINSTALL:
  35.    call SysFileTree srcepath, 'file', 'D'
  36.    if file.0 = 0 then do
  37.        say 'Incorrect diskette in drive 'srcedrv
  38.        exit
  39.        end
  40.  
  41.    call SysFileTree targdrv, 'file', 'D'
  42.    if file.0 = 0 then do
  43.       call CREATEPATH
  44.       end
  45.  
  46. return /* STARTINSTALL */
  47.  
  48.  
  49. INSTALRMPRO:
  50.    "@echo off"
  51.    copy srcepath'\*.* 'targdrv
  52.    settings='PROGTYPE=PM;EXENAME='targdrv'\ALRMPRO.EXE;OBJECTID=<ALRMPRO>;STARTUPDIR='targdrv
  53.    call SysCreateObject 'WPProgram', 'Alarm Pro', '<WP_DESKTOP>', settings, 'REPLACE'
  54.    echo on
  55. return
  56.  
  57.  
  58. CREATEPATH:
  59.  
  60.    do I = 1 to 5 by 1
  61.       say ' '
  62.       say 'Press Y to create the directory 'targdrv
  63.       say 'Press N to end the install'
  64.       rc = SysGetKey()
  65.       say ' '
  66.       say ' '
  67.       select
  68.           when rc = 'Y' then do
  69.               rc = SysMkDir(targdrv)
  70.               if rc \= 0 then do
  71.                   say 'Error Creating 'targdrv
  72.                   say 'Install Ended unsuccessfully'
  73.                   beep(454, 100)
  74.                   exit
  75.                   end
  76.               leave
  77.           end  /* Do */
  78.           when rc = 'y' then do
  79.               rc = SysMkDir(targdrv)
  80.               if rc \= 0 then do
  81.                  say 'Error Creating 'targdrv
  82.                  say 'Install Ended unsuccessfully'
  83.                  beep(454, 100)
  84.                  exit
  85.                  end
  86.               leave
  87.           end  /* Do */
  88.           when rc = 'N' then leave
  89.           when rc = 'n' then leave
  90.           otherwise beep(454, 100)
  91.       end  /* select */
  92.    end /* do */
  93.  
  94. return /* CREATEPATH */
  95.